From 50c848a992282f411511d0fef4642026dec6bef6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 18 Feb 2015 17:25:05 -0500 Subject: [PATCH] Explicitly set the a11y role of tooltip windows This seems better than trying to identify the 'tooltipness' of the window on the other side. https://bugzilla.gnome.org/show_bug.cgi?id=744683 --- gtk/gtktooltip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index ea762102b6..30c7333f74 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -35,6 +35,7 @@ #include "gtksizerequest.h" #include "gtkstylecontext.h" #include "gtkwindowprivate.h" +#include "gtkaccessible.h" #ifdef GDK_WINDOWING_WAYLAND @@ -170,6 +171,7 @@ gtk_tooltip_init (GtkTooltip *tooltip) GtkWidget *box; GtkWidget *image; GtkWidget *label; + AtkObject *atk_obj; tooltip->timeout_id = 0; tooltip->browse_mode_timeout_id = 0; @@ -195,6 +197,10 @@ gtk_tooltip_init (GtkTooltip *tooltip) context = gtk_widget_get_style_context (window); gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLTIP); + atk_obj = gtk_widget_get_accessible (window); + if (GTK_IS_ACCESSIBLE (atk_obj)) + atk_object_set_role (atk_obj, ATK_ROLE_TOOL_TIP); + /* FIXME: don't hardcode the padding */ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_widget_set_margin_start (box, 6); -- 2.30.2